﻿<html>
	<head>
		<title>Stauffware.Essentials C# class library &ndash; Revision History &amp; Known Issues</title>
		<link href="../../documentation/Stauffware.css" rel="StyleSheet" type="text/css" media="screen, print" />

<!--		<style type="text/css" media="screen">
			div.license { font-size:90%; border: 1px solid gray; margin: 1em 2em 1em 2em; padding: 0 1em 0 1em; }
			p.copyright { font-size:90%; }
		</style>
-->
	</head>
	<body>
		<table width="100%" cellspacing="0" cellpadding="0">
			<tr valign="top">
				<td><h1>Stauffware.Essentials C# class library<br />Revision History &amp; Known Issues</h1></td>
				<td align="right"><a class="btn" href="../_READ_ME_.html"><b>UP</b></a></td>
			</tr>
		</table>

		
		<h2 id="KnownIssues">Known Issues</h2>
		<ul>
			<li>ConsoleUtils.TryAttachToParentConsole - If you call this from a windows app (so you can
				write to an existing console), and then invoke the windows app from the command line
				and try to redirect its standard output to a file (e.g. "MyApp >foo.txt"), the file
				will be created but will be empty.  This is a known issue with the Win32 AttachConsole
				function; I haven't yet searched for a workaround.</li>
			<li>CmdLineParser: word-wrap of help only indents the first line.
				(Waiting for FormattingTextWriter to be ready.) </li>
			<li>There are still some hard-coded strings that should be obtained from resources.
				AppExitCode.cs (1), CmdLineParser.cs (10), ConsoleProgressReporter.cs (3).</li>
			<li>DateUtils.GetDateDiff needs a little tweaking for leap year related calculations.</li>
			<li>NiceTextReader isn't ready yet.</li>
			<li>Parsing:
				<ul>
					<li>The number lexers don't handle parentheses around negative numbers yet.
						The place to fix this is NumberLexer.cs</li>
					<li>TimeParser doesn't support timezones yet.</li>
					<li>DateParser is currently a wrapper around System.DateTime.Parse(), pending
						completion of a real implementation.</li>
					<li>DateTimeParser is currently a wrapper around System.DateTime.Parse(), pending
						completion of a real implementation.</li>
					<li>TimeSpanParser is currently a wrapper around System.TimeSpan.Parse(), pending
						completion of a real implementation.</li>
				</ul>
			</li>
			<li>Unit Tests:
				<ul>
					<li>No unit tests at all for these classes of significant complexity:<br />
						DateTimeParser, FloatParser, RepeatingTextWriter.</li>
					<li>Need a lot more testcases for:<br />
						CmdLineParser, DateLexer, DateParser, DecimalParser, FileSystemPath, TimeSpanParser</li>
				</ul>
			</li>
		</ul>

		
		<h2>Feature Requests</h2>
		<ul>
			<li>ErrorUtils.ValueToString() - add the ability to register type handlers</li>
			<li>CmdLineParser:
				<ul>
					<li>In the canned help for "Positional Parameters", need a special case for
						exactly 1 such param: Don't talk about order.  Also, don't talk abouts
						"*" if there aren't any optional params.</li>
					<li>Need a way to specify <i>nameless</i> positional parameters.<br/>
						(Isn't this done by just not giving them a name?  Test it.)</li>
					<li>If an app.config file contains a bogus value, CmdLineParser
						mistakenly reports it as having come from the command line.</li>
					<li>Add an argument to CmdLineArgAttribute for specifying a description of the default value.  
						If this is provided, display this instead of the actual default value.</li>
					<li>CmdLineParser - add an overridable OnExit() method.</li>
				</ul>
			</li>
			<li>Assertions - add overrides that, instead of taking string messages, take predicates
					that *return* strings.</li>
			<li>Add to the NumUtils.ToString methods params for format and I18N.</li>
		</ul>
		
		<h2 id="RevisionHistory">Revision History</h2>
		
			<dl>
				<dt><b>??? August 2014 - v.2.59</b></dt>
				<dd><ul>
					<li>Fixed broken IO.FileSystemPath.NormalizePath().</li>
					<li>Added unit tests for IO.FileSystemPath.NormalizePath().</li>
					<li>Removed the old CmdLineParser class along with CmdLineSwitch and its subclasses.</li>
					<li>Moved everything in Stauffware.Common.Console.New into Stauffware.Common.Console.</li>
					<li>Fixed DateParser (which was failing some unit tests) so that it now uses DateTime.ParseExact
						with dozens of format strings.</li>
					<li>Added more unit tests for DateParser.</li>
					<li>ErrorUtils.ValueToString() no longer returns an empty string for a value of type System.DBNull.
						Instead, if the value's ToString() method returns something invisible, it returns the type of the value.
					</li>
					<li>Moved HelpAttribute from Console/CustomAttributes.cs to its own file in Core.</li>
					<li>ConsoleApp - in Intellisense doc comment, mentioned use of Start().</li>
					<li>Changed how assembly version numbers are managed:
						<ul>
							<li>Version number now lives in VersionAndBuild.cs instead of AssemblyInfo.cs.</li>
							<li>Version number no longer includes build &amp; revision (via "*"), but only major &amp; minor.</li>
							<li>Assembly info now includes an "informational" version number, which contains
								the date and time of the build.</li>
							<li>Build date &amp; time live in VersionAndBuild_DateTime.cs, which is
								generated by GenerateDateFile.bat through a pre-build event.</li>
						</ul>
						</li>
					<li>Replaced "ed@mewsic.com" with "EdStauff@gmail.com" everywhere.</li>
					</ul></dd>
				<dt><b>26 June 2014 - v.2.58</b></dt>
				<dd><ul>
                    <li>Added unit tests for FileSystemPath.GetFullPath().</li>
                    <li>IO.PathCollection: fixed bugs in PathCollection.Add(), PathCollection.RemoveFile(),
                        and wildcard expansion.</li>
                    <li>Added new method FileSystemPath.GetFullPath().</li>
                    <li>Worked on debugging FormattingTextWriter, but it's still broken.</li>
				    </ul></dd>

				<dt><b>24 October 2013 - v.2.57</b></dt>
				<dd><ul>
					<li>TimeSpanParser (hack implementation) now handles OverflowException.</li>
					<li>NiceRegistryKey - FromPath() is now obsolete; use OpenFromPath() or CreateFromPath() instead.</li>
					<li>Assertion, Assumption - added constructors that take inner exceptions.</li>
					<li>Added new class: IO.PathCollection.</li>
					<li>Eliminated compiler warnings in FileSystemPath.cs.</li>
					</ul></dd>
				
				<dt><b>2 August 2013 - v.2.56</b></dt>
				<dd><ul>
					<li>Fixed Reflection_Extensions.HasFlagsAttribute &ndash; its return value was inverted.</li>
					<li>CommandLineParser help now does the right thing for enums with [Flags].</li>
					<li>Added ConsoleApp.FatalErrorPrefix.</li>
					<li>Added "prebuilt" directory.</li>
					</ul></dd>
				
				<dt><b>3 July 2013 - v.2.55</b></dt>
				<dd><ul>
					<li>Minor changes to unit tests.</li>
					<li>Due to a mysterious Perforce glitch, NiceRegKey.Contains() didn't get checked in with 2.54.</li>
					</ul></dd>
				
				<dt><b>Feb 2013 - v.2.54</b></dt>
				<dd><ul>
					<li>added NiceRegKey.Contains()</li>
					</ul></dd>
				
				<dt><b>14 Jan 2013 - v.2.53</b></dt>
				<dd><ul>
					</ul></dd>

				<dt><b>Dec 2012 - v.2.52</b></dt>
				<dd><ul>
					<li>CmdLineParser: added the first built-in switch "-CLP.versions",  which
						displays a list of all referenced assemblies. </li>
					<li>CmdLineParser: help no longer displays default values of "NULL" or "EMPTY".</li>
					<li>Added more comprehensive ad-hoc tests for CmdLineParser.</li>
					</ul></dd>

				<dt><b>Oct 2012 - v.2.51</b></dt>
				<dd><ul>
					<li>Fixed bug in CmdLineParser2 that prevented correct parsing of a 
						command-line parameter value containing an equals sign.</li>
					<li>Removed duplicate display of program name and version.</li>
					</ul></dd>

				<dt><b>28 Sept 2012 - v.2.50</b></dt>
				<dd><ul>
					<li>Lots of minor changes to support Silverlight.</li>
					<li>Added Collection_Extensions.</li>
					<li>CmdLineParser help now outputs all defined AppExitCodes.</li>
					<li>CmdLineParser now handles Nullable&lt;&gt; properly.</li>
					<li>Added extension method System.Type.IsNullable().</li>
					</ul></dd>

				<dt><b>1 Aug 2012 - v.2.10</b></dt>
				<dd><ul>
					<li>CmdLineParser now handles boolean fields and properties as valueless parameters.
						For a boolean field or property that takes a value, its type must be "bool?"
						(nullable boolean).
						</li>
					<li>Added CmdLineParser.GetParam() and interface ICmdLineParam.</li>
					<li>Added CmdLineParser.LogParams()</li>
					<li>Added a list of supported types to "documentation/CmdLineParser.html".</li>
					</ul></dd>

				<dt><b>July 2012 - v.2.9</b></dt>
				<dd><ul>
					<li>DumpExceptionChain now puts the top-level exception first,
						rather than the innermost, as it was doing before.</li>
					<li>Added the ErrorOr class.</li>
					<li>The Unit Tests project now builds a .exe rather than a .dll,
						to facilitate ad-hoc testing.</li>
					</ul></dd>

				<dt><b>18 June 2012 - v.2.8</b></dt>
				<dd><ul>
					<li>Added Exception_Extensions.</li>
					<li>Added to FileSystemPath: ResolveEnvironmentVariables and ResolveSpecialFolders.</li>
					<li>Reorganized the unit tests slightly.</li>
					</ul></dd>

				<dt><b>13 April 2012 - v.2.7</b></dt>
				<dd><ul>
					<li>Added to Reflection_Extensions: IsPrimitiveInteger and IsPrimitiveNumber.</li>
					<li>Improved ErrorUtils.ValueToString for numbers.</li>
					<li>Added more unit tests for ErrorUtils.</li>
					</ul></dd>

				<dt><b>Dec 2011 - v.2.6</b></dt>
				<dd><ul>
					<li>CmdLineParser - added unit tests, and fixed a number of bugs.  Still need more unit tests.</li>
					<li>ErrorUtils.DumpOneException now dumps public instance fields.</li>
					<li>Added ConsoleApp.Exit and an overload for ConsoleApp.Start.</li>
					</ul></dd>

				<dt><b>Dec 2011 - v.2.5</b></dt>
				<dd><ul>
					<li>Added Time_Extensions.</li>
					<li>Tagged TimeSpanUtils.MultiplyBy with [Obsolete] attribute.</li>
					<li>Added three static methods to ListString.</li>
					<li>Converted the NumUtils.ToString methods to extension methods.</li>
					</ul></dd>

				<dt><b>20 Dec 2011 - v.2.4</b></dt>
				<dd><ul>
					<li>Added a help page for CmdLineParser (not done yet, but better than none).</li>
					<li>Fixed bug in CmdLineParamGroup where IncludePublicPropertiesByDefault
						was affecting fields as well as properties, and IncludePublicFieldsByDefault
						was getting ignored.</li>
					</ul></dd>

				<dt><b>October 2011 - v.2.3.1</b></dt>
				<dd><ul>
					<li>Renamed TimeSpanUtils.TimeSpanToUnits to ToUnitValue and made it an
						extension function of TimeSpan.</li>
					<li>Added StringExtensions.IndexOfEnd, TimeSpanUtils.MultiplyBy</li>
					<li>Added DebugWriter, NiceTextReader, TextReaderWrapper.</li>
					</ul></dd>

				<dt><b>22 July 2011 - v.2.3</b></dt>
				<dd><ul>
					<li>Added ListString.</li>
					<li>Moved FileSystemPath from Core to IO.</li>
					<li>Bugfix in TimeSpanParse.</li>
					<li>Added unit tests for TimeSpanParse.</li>
					<li>Added to IReadOnlyDictionary and ReadOnlyDictionary: Key, Values, Count</li>
					</ul></dd>

				<dt><b>6 July 2011 - v.2.2</b></dt>
				<dd><ul>
					<li>Added TimeSpanSwitch.</li>
					<li>Modified DateTimeSwitch to use DateTimeParser instead of its own (ancient) custom parsing code.</li>
					<li>Moved TimeSpan utility methods from DateUtils to new class TimeSpanUtils.</li>
					<li>Improved documentation.</li>
					<li>Eliminated nearly all compiler warnings.</li>
					<li>Added RepeatingTextWriter</li>
					</ul></dd>

				<dt><b>24 June 2011 - v.2.1</b></dt>
				<dd><ul>
					<li>Added String_Extensions.TrimEnd(int)</li>
					<li>Added ErrorUtils.DumpExceptionChain(Exception); also improved documentation
						comments in that file while I was there.
					</li>
					</ul></dd>

				<dt><b>20 June 2011 - v.2.0</b></dt>
				<dd>
					<ul>
					<li>Rebranded from Stauff Consulting (ver. 1.12) to Stauffware.</li>
					<li>Added "Assume" to Assertions.</li>
					<li>Added new number parsing classes per the Parser/Parse pattern.</li>
					<li>Renamed Switch* to CmdLineSwitch*.</li>
					<li>Added collections.</li>
					</ul></dd>

				<dt><b>6 Feb 2011 - v.1.11</b></dt>
				<dd>Added ArgsFileSwitch class.</dd>
				
				<dt><b>20 Jan 2011 - v.1.10</b></dt>
				<dd>
					<ul>
					<li>Added a bunch of stuff to RegKey.</li>
					<li>Added generic EnumSwitch&lt;T&gt; class.</li>
					</ul>
				</dd>
				
				<dt><b>31 Dec 2010 - v.1.9</b></dt>
				<dd>Fixed a bug in ErrorUtils.cs.</dd>
			</dl>

		<div class="license">
			<p>Copyright 2011 Edward L. Stauff. &nbsp;	Contact: <a href="mailto:EdStauff@gmail.com">EdStauff@gmail.com</a></p>
			<p>
				This file is part of the "Stauffware.Essentials" library.             
				"Stauffware.Essentials" is free software: you can redistribute it     
				and/or modify it under the terms of the GNU Lesser Public License as published     
				by the Free Software Foundation, either version 3 of the License, or (at your      
				option) any later version.                                                         
			</p><p>
				"Stauffware.Essentials" is distributed in the hope that it will       
				be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of          
				MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser           
				Public License for more details.                                                   
			</p><p>
				You should have received a copy of the GNU Lesser Public License along with        
				"Stauffware.Essentials".  If not, see 
				<a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>. 
			</p>
		</div>
	</body>
</html>

